﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;
using YasharEl.Infrastructure.TaskEngine.Assignments;

namespace YasharEl.Infrastructure.TaskEngine.EntityModel.Assignments
{
    public class TaskAssignmentEntity : Entity, ITaskAssignment
    {
        #region ITaskAssignment Members

        public virtual long TaskAssignmentId
        {
            get;
            set;
        }

        public virtual ITaskParticipant AssignedTo
        {
            get;
            set;
        }

        public virtual ITaskParticipant CreatedBy
        {
            get;
            set;
        }

        public virtual DateTime CreatedDate
        {
            get;
            set;
        }

        public virtual bool IsActive
        {
            get;
            set;
        }

        public virtual DateTime? ModifiedDate
        {
            get;
            set;
        }

        public virtual ITaskParticipant ModifiedBy
        {
            get;
            set;
        }

        public virtual ITask AssignedToTask
        {
            get;
            set;
        }

        #endregion

        #region Entity Overrides

        public override long Id
        {
            get
            {
                return TaskAssignmentId;
            }
            protected set
            {
                TaskAssignmentId = value;
            }
        }

        #endregion
    }
}
